# -*- coding: utf-8 -*-
# @Time    : 2022/7/18 14:58
# @Author  : vvh
# @Email   : 2647167477@qq.com
# @File    : run_test_good.py
# @Software: PyCharm
import unittest
import time
from BeautifulReport import BeautifulReport
from config.config import CASES_TEST_GOODS_PATH,REPORTS_PATH

suite = unittest.defaultTestLoader.discover(CASES_TEST_GOODS_PATH,"test*.py")
new = time.strftime("%Y_%m_%d-%H%M%S")
report_name = "test-crm-{}.html".format(new)

runner = BeautifulReport(suite)
runner.report(description="测试报告",
              report_dir=REPORTS_PATH,
              filename=report_name)